// =============================================================================
//  STATS - Statistical Analysis Tools, v.0.01
//  Copyright (C) 2011  Marco Vettigli
// -----------------------------------------------------------------------------
//
// This program  is free software:  you can  redistribute it and/or  modify it
// under the terms of the  GNU General Public License as published by the Free
// Software Foundation,  either version 3 of the License,  or (at your option)
// any later version.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY;  without even  the  implied  warranty  of  MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.  See the  GNU General Public License  for
// more details.
//
// You  should  have received a copy of the  GNU General Public License  along
// with this program.  If not, see <http://www.gnu.org/licenses/>.
//
// =============================================================================
//
// SCOLPROPERTY.H
// The class defines a properties of a given columns inside STable.
//
// Author: Marco Vettigli
//
// =============================================================================

#ifndef SCOLPROPERTY_H
#define SCOLPROPERTY_H

// == include directives =======================================================

#include <QString>

// == class definitions ========================================================

namespace StatS {

class SColProperty
{

public:

// == constructors and destructors =============================================

    SColProperty();

// == enums ====================================================================

    enum ArrayType { Undefined, SStrings, SDoubles };

// == getters ==================================================================

    ArrayType type() const;
    void* array() const;
    QString description() const;
    QString units() const;
    double usl() const;
    double lsl() const;

    QString getToolTip() const;

// == setters ==================================================================

    bool setType(ArrayType type);
    bool setArray(void* array);
    bool setSelected(bool state);
    bool setDescription(const QString description);
    bool setUnits(const QString units);
    bool setUsl(double usl);
    bool setLsl(double lsl);

// == inspectors ===============================================================

    bool isSelected() const;

// == accessor function declarations ===========================================

// == variable declarations ====================================================

private:

    ArrayType _type;
    void* _array;
    bool _selectedState;

    QString _description;
    QString _units;
    double _usl;
    double _lsl;

// == private function declarations ============================================

};

}

#endif // SCOLPROPERTY_H
